<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'

const orderId = ref<string>('')

onLoad((options) => {
  console.log('接收到的参数：', options)
  orderId.value = options?.id || ''
})
</script>

<template>
  <view class="content">
    <uni-nav-bar
      dark :fixed="true" background-color="#ffffff" status-bar title="我的订单" color="##393D40" left-icon="left"
      @clickLeft="() => {
        uni.navigateBack({
          delta: 1,
        })
      }"
    />

    <scroll-view scroll-y class="content  ">
      <view class="mt-[24rpx] bg-white px-[20rpx] py-[32rpx] text-[28rpx]">
        <view class=" mb-[42rpx] font-medium text-[#393D40]">
          订单信息
        </view>
        <view class="mb-[32rpx] flex">
          <view class=" mr-[80rpx] shrink-0 text-[#919BA1]">
            订单信息
          </view>
          <view class=" flex   overflow-hidden text-[##393D40]">
            <view class=" mr-[12rpx] flex-1  truncate">
              L00001250712001L0L0000
            </view>
            <img
              class="size-[40rpx] " src="../../../static/copy.png" alt="copy" @click="() => {
                uni.setClipboardData({
                  data: 'L00001250712001L0L0000',
                  success: () => {
                    uni.showToast({
                      title: '复制成功',
                      icon: 'none',
                    })
                  },
                })
              }"
            >
          </view>
        </view>
        <view class="mb-[32rpx] flex">
          <view class=" mr-[80rpx] text-[#919BA1]">
            订单状态
          </view>
          <view class="truncate text-[##393D40]">
            待确认
          </view>
        </view>
        <view class="mb-[32rpx] flex">
          <view class=" mr-[80rpx] text-[#919BA1]">
            创建时间
          </view>
          <view class="truncate text-[##393D40]">
            2025-09-01 12:23:30
          </view>
        </view>
        <view class="mb-[32rpx] flex">
          <view class=" mr-[80rpx] text-[#919BA1]">
            网销信息
          </view>
          <view class="truncate text-[##393D40]">
            张三思 丨 18801761392
          </view>
        </view>
        <view class=" flex">
          <view class=" mr-[80rpx] text-[#919BA1]">
            资源信息
          </view>
          <view class="truncate text-[##393D40]">
            王大 丨 18987871314
          </view>
        </view>
      </view>

      <view class="mt-[24rpx] bg-white px-[20rpx] py-[32rpx] text-[28rpx]">
        <view class=" mb-[42rpx] font-medium text-[#393D40]">
          基础信息
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            客户姓名
          </view>
          <view class="flex overflow-hidden text-[#393D40]">
            <view class="mr-[12rpx] flex-1 truncate">
              江西好再来汽车贸易有限公司
            </view>
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            所在城市
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            江西省 - 赣州市
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            联系人
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            金银花
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            联系方式
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            18801761392
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            验收方式
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            甲方自提
          </view>
        </view>

        <view class="flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            交车地点
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            4S店
          </view>
        </view>
      </view>

      <view class="mt-[24rpx] bg-white px-[20rpx] py-[32rpx] text-[28rpx]">
        <view class=" mb-[42rpx] font-medium text-[#393D40]">
          款项金额
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            已收订金
          </view>
          <view class="flex overflow-hidden text-[#393D40]">
            <view class="mr-[12rpx] flex-1 truncate">
              0.00
            </view>
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            已付订金
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            已退订金
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            上游退回
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            实际利润
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>

        <view class="mb-[32rpx] ">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            预估利润
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>
        <view class="flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            业绩金额
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            0.00
          </view>
        </view>
      </view>

      <view class="mt-[24rpx] bg-white px-[20rpx] py-[32rpx] text-[28rpx]">
        <view class=" mb-[42rpx] font-medium text-[#393D40]">
          订购车辆
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            车辆信息
          </view>
          <view class="flex overflow-hidden text-[#0273BF]">
            <view class="mr-[12rpx] flex-1 truncate">
              本田 思域 2025款 1.5T CVT 240 本田 思域 2025款 1.5T CVT 240 本田 思域 2025款 1.5T CVT 240
            </view>
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            数量
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            1
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            车辆进价
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            190800.00/辆
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            销售单价
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            190800.00/辆
          </view>
        </view>

        <view class="mb-[32rpx] flex">
          <view class="w-[200rpx] shrink-0 text-[#919BA1]">
            期货车
          </view>
          <view class="flex-1 truncate text-[#393D40]">
            否
          </view>
        </view>
      </view>
    </scroll-view>

    <view class=" fixed bottom-0 left-0 z-10 w-full bg-white px-[20rpx] py-[40rpx] ">
      <view class="flex h-[100rpx] flex-col justify-center  rounded-[16rpx] bg-[#0273BF]  text-[34rpx]">
        <view class="text-center align-middle text-[#ffffff]">
          编辑订单
        </view>
      </view>
    </view>
  </view>
</template>

<style lang="scss" scoped>
.uni-icons {
  font-size: 24rpx !important;
}
</style>
